<?php 

/*
* base class for controller
*/
abstract class Controller{
	protected $model;
	private $actionName;
	protected $view;
	protected $controllerBaseName;
	
	public function __construct($controllerName,$action){
		$this->controllerBaseName = $controllerName;
		$this->actionName = $action;
		$modelName = ucwords($controllerName).'Model';
		$this->model = new $modelName();
		$this->view = new View(HOME . DS . 'views' . DS . strtolower($this->controllerBaseName) . DS . strtolower($this->actionName) .'.tpl');		
	}
	
}
?>
